﻿using System;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.BussinessVoucher
{
    /// <summary>
    /// FixedAssetLedger
    /// </summary>
    public class FixedAssetLedger : BusinessObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FixedAssetLedger"/> class.
        /// </summary>
        public FixedAssetLedger()
        {
            AddRule(new ValidateRequired("RefId"));
            AddRule(new ValidateRequired("RefTypeId"));
            AddRule(new ValidateRequired("RefNo"));
            AddRule(new ValidateRequired("RefDate"));
            AddRule(new ValidateRequired("PostedDate"));
        }


        /// <summary>
        /// Initializes a new instance of the <see cref="FixedAssetLedger"/> class.
        /// </summary>
        /// <param name="fixedAssetLedgerId">The fixed asset ledger identifier.</param>
        /// <param name="refId">The reference identifier.</param>
        /// <param name="refTypeId">The reference type identifier.</param>
        /// <param name="refNo">The reference no.</param>
        /// <param name="refDate">The reference date.</param>
        /// <param name="postedDate">The posted date.</param>
        /// <param name="fixedAssetId">The fixed asset identifier.</param>
        /// <param name="departmentId">The department identifier.</param>
        /// <param name="lifeTime">The life time.</param>
        /// <param name="annualDepreciationRate">The annual depreciation rate.</param>
        /// <param name="annualDepreciationAmount">The annual depreciation amount.</param>
        /// <param name="orgPriceAccount">The org price account.</param>
        /// <param name="orgPriceDebitAmount">The org price debit amount.</param>
        /// <param name="orgPriceCreditAmount">The org price credit amount.</param>
        /// <param name="depreciationAccount">The depreciation account.</param>
        /// <param name="depreciationDebitAmount">The depreciation debit amount.</param>
        /// <param name="depreciationCreditAmount">The depreciation credit amount.</param>
        /// <param name="budgetSourceAccount">The budget source account.</param>
        /// <param name="budgetSourcelDebitAmount">The budget sourcel debit amount.</param>
        /// <param name="accountNumberVat"> </param>
        /// <param name="budgetSourceCreditAmount">The budget source credit amount.</param>
        /// <param name="amountVat"> </param>
        /// <param name="journalMemo">The journal memo.</param>
        /// <param name="description">The description.</param>
        /// <param name="unitId"> </param>
        public FixedAssetLedger(long fixedAssetLedgerId, long refId, int refTypeId, string refNo, DateTime refDate, DateTime postedDate, int fixedAssetId, int departmentId,
            float lifeTime, float annualDepreciationRate, decimal annualDepreciationAmount, string orgPriceAccount, decimal orgPriceDebitAmount,
             decimal orgPriceCreditAmount, string depreciationAccount, decimal depreciationDebitAmount,
             decimal depreciationCreditAmount, string budgetSourceAccount, decimal budgetSourcelDebitAmount,
            string accountNumberVat, decimal budgetSourceCreditAmount, decimal amountVat, string journalMemo, string description, long unitId)
            : this()
        {
            FixedAssetLedgerId = fixedAssetLedgerId;
            RefId = refId;
            RefTypeId = refTypeId;
            RefNo = refNo;
            RefDate = refDate;
            PostedDate = postedDate;
            FixedAssetId = fixedAssetId;
            DepartmentId = departmentId;
            LifeTime = lifeTime;
            AnnualDepreciationRate = annualDepreciationRate;
            AnnualDepreciationAmount = annualDepreciationAmount;
            OrgPriceAccount = orgPriceAccount;
            OrgPriceDebitAmount = orgPriceDebitAmount;
            OrgPriceCreditAmount = orgPriceCreditAmount;
            DepreciationAccount = depreciationAccount;
            DepreciationDebitAmount = depreciationDebitAmount;
            DepreciationCreditAmount = depreciationCreditAmount;
            BudgetSourceAccount = budgetSourceAccount;
            BudgetSourcelDebitAmount = budgetSourcelDebitAmount;
            BudgetSourceCreditAmount = budgetSourceCreditAmount;
            JournalMemo = journalMemo;
            Description = description;
            UnitId = unitId;
            AccountNumberVat = accountNumberVat;
            AmountVat = amountVat;
        }

        /// <summary>
        /// Gets or sets the fixed asset ledger identifier.
        /// </summary>
        /// <value>
        /// The fixed asset ledger identifier.
        /// </value>
        public long FixedAssetLedgerId { get; set; }

        /// <summary>
        /// Gets or sets the reference identifier.
        /// </summary>
        /// <value>
        /// The reference identifier.
        /// </value>
        public long RefId { get; set; }

        /// <summary>
        /// Gets or sets the reference type identifier.
        /// </summary>
        /// <value>
        /// The reference type identifier.
        /// </value>
        public int RefTypeId { get; set; }

        /// <summary>
        /// Gets or sets the reference no.
        /// </summary>
        /// <value>
        /// The reference no.
        /// </value>
        public string RefNo { get; set; }

        /// <summary>
        /// Gets or sets the reference date.
        /// </summary>
        /// <value>
        /// The reference date.
        /// </value>
        public DateTime RefDate { get; set; }

        /// <summary>
        /// Gets or sets the posted date.
        /// </summary>
        /// <value>
        /// The posted date.
        /// </value>
        public DateTime PostedDate { get; set; }

        /// <summary>
        /// Gets or sets the fixed asset identifier.
        /// </summary>
        /// <value>
        /// The fixed asset identifier.
        /// </value>
        public int FixedAssetId { get; set; }

        /// <summary>
        /// Gets or sets the department identifier.
        /// </summary>
        /// <value>
        /// The department identifier.
        /// </value>
        public int? DepartmentId { get; set; }

        /// <summary>
        /// Gets or sets the life time.
        /// </summary>
        /// <value>
        /// The life time.
        /// </value>
        public float LifeTime { get; set; }

        /// <summary>
        /// Gets or sets the annual depreciation rate.
        /// </summary>
        /// <value>
        /// The annual depreciation rate.
        /// </value>
        public float AnnualDepreciationRate { get; set; }

        /// <summary>
        /// Gets or sets the annual depreciation amount.
        /// </summary>
        /// <value>
        /// The annual depreciation amount.
        /// </value>
        public decimal AnnualDepreciationAmount { get; set; }

        /// <summary>
        /// Gets or sets the org price account.
        /// </summary>
        /// <value>
        /// The org price account.
        /// </value>
        public string OrgPriceAccount { get; set; }

        /// <summary>
        /// Gets or sets the org price debit amount.
        /// </summary>
        /// <value>
        /// The org price debit amount.
        /// </value>
        public decimal OrgPriceDebitAmount { get; set; }

        /// <summary>
        /// Gets or sets the org price credit amount.
        /// </summary>
        /// <value>
        /// The org price credit amount.
        /// </value>
        public decimal OrgPriceCreditAmount { get; set; }

        /// <summary>
        /// Gets or sets the depreciation account.
        /// </summary>
        /// <value>
        /// The depreciation account.
        /// </value>
        public string DepreciationAccount { get; set; }

        /// <summary>
        /// Gets or sets the depreciation debit amount.
        /// </summary>
        /// <value>
        /// The depreciation debit amount.
        /// </value>
        public decimal DepreciationDebitAmount { get; set; }

        /// <summary>
        /// Gets or sets the depreciation credit amount.
        /// </summary>
        /// <value>
        /// The depreciation credit amount.
        /// </value>
        public decimal DepreciationCreditAmount { get; set; }

        /// <summary>
        /// Gets or sets the budget source account.
        /// </summary>
        /// <value>
        /// The budget source account.
        /// </value>
        public string BudgetSourceAccount { get; set; }

        /// <summary>
        /// Gets or sets the budget sourcel debit amount.
        /// </summary>
        /// <value>
        /// The budget sourcel debit amount.
        /// </value>
        public decimal BudgetSourcelDebitAmount { get; set; }

        /// <summary>
        /// Gets or sets the budget source credit amount.
        /// </summary>
        /// <value>
        /// The budget source credit amount.
        /// </value>
        public decimal BudgetSourceCreditAmount { get; set; }

        /// <summary>
        /// Gets or sets the journal memo.
        /// </summary>
        /// <value>
        /// The journal memo.
        /// </value>
        public string JournalMemo { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public long UnitId { get; set; }

        /// <summary>
        /// Gets or sets the budget category code.
        /// </summary>
        /// <value>
        /// The budget category code.
        /// </value>
        public string AccountNumberVat { get; set; }

        /// <summary>
        /// Gets or sets the budget chapter code.
        /// </summary>
        /// <value>
        /// The budget chapter code.
        /// </value>
        public decimal AmountVat { get; set; }
    }
}
